<script setup>
import { useGlobalStore } from '../../store/global'
const store = useGlobalStore()
</script>

<template>
  <div>
    <v-btn
      :prepend-icon="!store.edit ? 'mdi-pencil' : 'mdi-check-circle'"
      @click="store.changeEdit"
    >
      <template #prepend>
        <v-icon color="success"></v-icon>
      </template>
      <span v-if="!store.edit" class="f12"> 编辑 </span>
      <span v-if="store.edit" class="f12"> 保存 </span>
    </v-btn>
  </div>
</template>
